<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <input type="checkbox" id="inp" />
    <script>
      // 浏览器内部: const inpt = document.getElementById('inp')
      //   console.log(inp)
      // inp.onclick = function () {
      //   console.log('click触发了')
      // }
      // inp.onchange = function () {
      //   console.log('change触发了')
      // }

      const arr = ['a', 'b', 'c']
      const newArr = arr.filter((item) => {
        // if (item !== 'b') {
        //   return true
        // } else {
        //   return false
        // }
        return item !== 'b'
      })
      console.log(newArr)
    </script>
  </body>
</html>
